<?php
namespace app\api\controller;
use app\common\controller\Api;
use app\api\service\Token;

class User extends Api
{
    public function wx_info()
    {
        $data = input('post.');
        $uid = Token::getCurrentUid();
        $userData = [
            'nickname' => $data['nickname'],
            'avatar'  => $data['avatar'],
            'extend' => $data['extend']
        ];
        return model('User')->save($userData, ['id' => $uid]);
    }
}
